home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.m68k
- Path: netcom.com!ludis
- From: ludis@netcom.com (Ludis Langens)
- Subject: Re: BSR vs. JSR
- Message-ID: <ludisDKozAI.7pL@netcom.com>
- Organization: It's here somewhere
- References: <30EBF0B3.6749@bmdl2.bbn.hp.com>
- Date: Fri, 5 Jan 1996 05:01:30 GMT
- Sender: ludis@netcom10.netcom.com
-
- In article <30EBF0B3.6749@bmdl2.bbn.hp.com> Ernst Geesmann <praktwg@bmdl2.bbn.hp.com> writes:
- >My software uses BSR and JSR instructions. Everything's fine if
- >the stack is placed into SRAM. But if I place the stack into DRAM
- >strange things happen:
- >On BSR the return address is pushed to the stack - OK
- >Several BSR follow, each time return address is pushed and
- >can be pulled - OK
- >A JSR is used, return address pushed - OK
- >With the first BSR after this JSR only the lower 16 bit of the
- >return address is pushed to the stack, but the stack pointer is
- >moved for 4 furthter bytes.
-
- Three ideas:
- 1) You have a memory trashing bug.
- 2) Your BSRs/JSRs aren't written correctly to deal with 32 bit addresses:
- You might have exceeded the range of a BSR.W (and your assembler
- didn't catch it.) Partial address decoding might make the code
- run, but the upper word of the PC is wrong.
- You used JSR <ABS.W> where JSR <ABS.L> is needed.
- 3) You have a memory timing bug (maybe a refresh problem) that just
- happens to show up where you found it (i.e. it has nothing to do
- with BSR vs JSR.)
-
- I'd say that #1 is the most likely problem...
-
- --
- unsigned long Obfuscate(unsigned long i) {unsigned long t;
- Ludis Langens return i ? (t = Obfuscate(i >> 1), (t << 1) + (i & 1) +
- ludis@netcom.com (t + 858993459 >> 2 & 572662306) * 3) : 0;}
-